#!/usr/bin/python3
import smbus
import time

pin = int(input("接口编号"))
address = 0x48
A0 = 0x40
A1 = 0x41
A2 = 0x42
A3 = 0x43
a_list = [A0, A1, A2, A3]
bus = smbus.SMBus(1)
while True:
    bus.write_byte(address, a_list[pin])
    value = bus.read_byte(address)
    print("AOUT:%1.3f  " % (value * 3.3 / 255))
    time.sleep(1)
